package cz.khfotbal.beans;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import cz.khfotbal.domain.Competion;
import cz.khfotbal.domain.Contact;
import cz.khfotbal.domain.Delegationczech;
import cz.khfotbal.domain.Match;
import cz.khfotbal.service.ContactService;
import cz.khfotbal.service.DelegationczechService;
import cz.khfotbal.service.MatchService;

@Component
@Scope(value = "session")
public class DelegationczechBean {

	@Autowired
	private DelegationczechService delegationczechService;

	private Delegationczech selecteddelegationczech;
	private Delegationczech newdelegationczech;

	public DelegationczechBean(){
		newdelegationczech = new Delegationczech();
		selecteddelegationczech = new Delegationczech();
	}
	
	public void createDelegationczech(){
		delegationczechService.createDelegationczech(newdelegationczech);
		newdelegationczech = new Delegationczech();
	}
	
	public void updateDelegationczech(){
		if (selecteddelegationczech != null){
			delegationczechService.updateDelegationczech(selecteddelegationczech);
		}
	}
	
	public void deleteDelegationczech(){
		if (selecteddelegationczech != null){
			delegationczechService.deleteDelegationczech(selecteddelegationczech);
		}
	}
	
	public List<Delegationczech> getDelegationczech(){
		return delegationczechService.getAllDelegationCzech();
	}	
	
	public Delegationczech getSelecteddelegationczech() {
		return selecteddelegationczech;
	}

	public void setSelecteddelegationczech(Delegationczech selecteddelegationczech) {
		this.selecteddelegationczech = selecteddelegationczech;
	}


	public Delegationczech getNewdelegationczech() {
		return newdelegationczech;
	}


	public void setNewdelegationczech(Delegationczech newdelegationczech) {
		this.newdelegationczech = newdelegationczech;
	}
}
